//
//  TG_TopOpenLotteryRecordCell.m
//  WanCaiC8
//
//  Created by QiuXun on 2019/1/26.
//  Copyright © 2019 TroubleTeam. All rights reserved.
//

#import "TG_TopOpenLotteryRecordCell.h"

@implementation TG_TopOpenLotteryRecordCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle=UITableViewCellSelectionStyleNone;
        
        [self setupUI];
        
    }
    return self;
}

-(void)setupUI{
    
    self.backgroundColor= DEFAULTBGCOLOR;
    UILabel *issueTitle = [UILabel tg_labelWithText:@"期数" fontSize:16 color:DEFAULTTEXTCOLOR];
    issueTitle.textAlignment =NSTextAlignmentCenter;
     [self.contentView addSubview:issueTitle];
    [issueTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(10);
        make.bottom.equalTo(self.contentView).offset(-10);
        make.left.equalTo(self.contentView);
        make.width.mas_offset(100);
    }];
    
    
    UIView *line=[[UIView alloc]init];
    line.backgroundColor=DEFAULTLINECOLOR;
    [self.contentView addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.equalTo(self.contentView);
        make.left.equalTo(issueTitle.mas_right);
        make.width.mas_equalTo(0.7);
    }];
    
    UILabel *numLabel = [UILabel tg_labelWithText:@"开奖号" fontSize:14 color:DEFAULTTEXTCOLOR];
    numLabel.textAlignment =NSTextAlignmentCenter;
    [self.contentView addSubview:numLabel];
    
    [numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView);
        make.left.equalTo(line.mas_right);
        make.top.equalTo(self.contentView).offset(10);
        make.bottom.equalTo(self.contentView).offset(-10);
    }];
    
    UIView *bottomLine=[[UIView alloc]init];
    bottomLine.backgroundColor=DEFAULTLINECOLOR;
    [self.contentView addSubview:bottomLine];
    [bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.contentView);
        make.height.mas_equalTo(0.7);
    }];
}

@end
